package com.sws.controllers;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.security.access.annotation.Secured;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class homeController {

	@RequestMapping({ "/", "/home" })
	public String showHomePage(Map<String, Object> model, 
			HttpServletRequest request, 
			HttpServletResponse response) {
		
		return "home";
	}
	
	@RequestMapping({ "/about" })
	public String showAboutPage(Map<String, Object> model, 
			HttpServletRequest request, 
			HttpServletResponse response) {
		
		return "about";
	}
	
	@Secured("ROLE_SWSUSER")
	@RequestMapping({ "/private" })
	public String showPrivatePage(Map<String, Object> model, 
			HttpServletRequest request, 
			HttpServletResponse response) {
		
		return "private";
	}
	
}
